package com.qf.blogsystem.core.service;

import java.util.List;

/**
 * @author Crazy
 * @version 1.0
 * @description: 抽象service接口,封装其他service中共有方法
 * @date 2022/12/2 19:39
 */
public interface BaseService<T> {
    //新增数据
    public boolean save(T t) throws Exception;
    //更新数据
    public boolean update(T t) throws Exception;
    //删除数据
    public boolean remove(Integer id) throws Exception;
    //查询数据
    public T byId(Integer id) throws Exception;
    //查询所有数据
    public List<T> list() throws Exception;
    //批量删除数据
    public boolean batchRemove(List<Integer> ids) throws Exception;
}
